import axios from 'axios'

const server = axios.create({
  baseURL: 'http://118.190.205.110:3500',
  // baseURL: 'http://127.0.0.1:3500',
  timeout: 5000
})

// request interceptors
server.interceptors.request.use(
  (conf) => {
    return conf
  },
  (error) => {
    return Promise.reject(error)
  }
)

// response interceptors
server.interceptors.response.use(
  (res) => {
    return res
  },
  (error) => {
    return Promise.reject(error)
  }
)

export default server
